# -!- coding: utf-8 -!-
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
#作者：cacho_37967865
#博客：https://blog.csdn.net/sinat_37967865
#文件：baidu_question.py
#日期：2023-12-31
#备注：Python利用百度文库中搜索相关题目 https://api.pearktrue.cn/
https://api.pearktrue.cn/api/baidutiku/?question=答案
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
import requests
from pycacho.cachobase.deal_json import dict_to_json
from pycacho.cachobase.file_deal import save_file

def question():
    url = "https://api.pearktrue.cn/api/ocr/?"
    response = requests.get(url)
    print(response)
    save_file('F:\PythonProject\\test.jpg',response.content)
    #data = response.json()
    #dict_to_json(data)

if __name__ == '__main__':
    question()